package vip.geeker.iotms.persistance.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class DataSplitRule extends PageParam implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer typeDataId;

    private Integer typeId;

    private String seperator;

    private String sort;

    private Integer creator;

    private Date createTime;

    private Integer modidier;

    private Date lastUpdTime;

    private Boolean deleteFlag;

    public DataSplitRule(Integer id, Integer typeDataId, Integer typeId,String seperator, String sort, Integer creator, Date createTime, Integer modidier, Date lastUpdTime, Boolean deleteFlag) {
        this.id = id;
        this.typeDataId = typeDataId;
        this.typeId = typeId;
        this.seperator = seperator;
        this.sort = sort;
        this.creator = creator;
        this.createTime = createTime;
        this.modidier = modidier;
        this.lastUpdTime = lastUpdTime;
        this.deleteFlag = deleteFlag;
    }

    public DataSplitRule() {
        super();
    }

    public static DataSplitRule.Builder builder() {
        return new DataSplitRule.Builder();
    }

    public static class Builder {
        private DataSplitRule obj;

        public Builder() {
            this.obj = new DataSplitRule();
        }

        public Builder id(Integer id) {
            obj.setId(id);
            return this;
        }

        public Builder typeDataId(Integer typeDataId) {
            obj.setTypeDataId(typeDataId);
            return this;
        }

        public Builder seperator(String seperator) {
            obj.setSeperator(seperator);
            return this;
        }

        public Builder sort(String sort) {
            obj.setSort(sort);
            return this;
        }

        public Builder creator(Integer creator) {
            obj.setCreator(creator);
            return this;
        }

        public Builder createTime(Date createTime) {
            obj.setCreateTime(createTime);
            return this;
        }

        public Builder modidier(Integer modidier) {
            obj.setModidier(modidier);
            return this;
        }

        public Builder lastUpdTime(Date lastUpdTime) {
            obj.setLastUpdTime(lastUpdTime);
            return this;
        }

        public Builder deleteFlag(Boolean deleteFlag) {
            obj.setDeleteFlag(deleteFlag);
            return this;
        }

        public DataSplitRule build() {
            return this.obj;
        }
    }
}